﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;
using DFCLib;

namespace dctmMiddleService
{
    // NOTE: If you change the interface name "IService1" here, you must also update the reference to "IService1" in Web.config.
    [ServiceContract]
    [ServiceKnownType(typeof(ValueAssistance))]
    public interface IDctmMiddleService
    {

        [OperationContract]
        string GetData(int value);

        [OperationContract]
        CompositeType GetDataUsingDataContract(CompositeType composite);

        #region Documentum Methods
        // TODO: Add your service operations here

        [OperationContract]
        List<ValueAssistance> GetCurrentValueAssistanceList(String customType, String customAttribute);

        [OperationContract]
        void setValueAssistanceList(ValueAssistance[] p_list, String customType, String customAttribute);

        #endregion Documentum Methods

    }


    // Use a data contract as illustrated in the sample below to add composite types to service operations.
    [DataContract]
    public class CompositeType
    {
        bool boolValue = true;
        string stringValue = "Hello ";

        [DataMember]
        public bool BoolValue
        {
            get { return boolValue; }
            set { boolValue = value; }
        }

        [DataMember]
        public string StringValue
        {
            get { return stringValue; }
            set { stringValue = value; }
        }
    }

    [DataContract]
    public class ValueAssistance
    {
        protected String dataValue = null;
        protected String dataString = null;
        protected String description = null;

        [DataMember]
        public String Value
        {
            get { return dataValue; }
            set { dataValue = value; }
        }

        [DataMember]
        public String DisplayString
        {
            get { return dataString; }
            set { dataString = value; }
        }

        [DataMember]
        public String Description
        {
            get { return description; }
            set { description = value; }
        }
    }



}
